.message-box {
    position: fixed;
    z-index: 10000;
    right: 1em;
    top: 1em;
    width: 10em;
    max-height: 100vh;
    padding: 1em;
    overflow: hidden;
}

.message-item {
    width: 9em;
    float: left;
    border-radius: 1em;
    margin-top: 1em;
    padding: 1em;
    margin-left: 0em;
    color: #fff;
    transition: all .3s;
    overflow: hidden;
}

.successMessage {
    background-color: #b8da8dDD;
}

.errorMessage {
    background-color: red;
}

.message-item>* {
    /* 防止事件穿透 */
    pointer-events: none;
    float: left;
}

.message-item .message-icon {
    display: inline-block;
    color: green;
    font-size: 1.2em;
    width: 1.5em;
    height: 1.5em;
    margin: 0 0.5em;
    text-align: center;
    line-height: 1.5em;
}

.message-item .message-title {
    display: inline-block;
    width: 6em;
    line-height: 1.5em;
    /* 只显示一行 */
    white-space: nowrap;
    font-size: 1.3em;
    font-weight: 600;
}

.message-item .message-text {
    width: 9em;
}

@keyframes message-appear {
    0% {
        margin-left: 8em;
        opacity: 0;
    }

    100% {
        opacity: 1;
        margin-left: 0em;
    }
}